<template>
	<!-- 分类列表组件 -->
	<view class="ication">
		<view class="ication-main" @tap="icationClick(item,index)" v-for="(item,index) in cateList" :key="index">
			<view class="ication-img">
				<image :src="item.pic_url" mode=""></image>
			</view>
			<view class="ication-text">{{item.name}}</view>
		</view>
	</view>
</template>

<script>
	export default{
		props:{
			cateList:Array
		},
		data(){
			return{
			}
		},
		methods:{
			icationClick(item,index){//点击商品
				// console.log(item,index)
				JSON.stringify(this.cateList)
				uni.navigateTo({
					url:`/otherPages/assort/assort?cateList=${JSON.stringify(this.cateList)}&orderItem=${JSON.stringify(item)}&index=${index}`
				})
			},
		}
	}
</script>

<style lang="scss" scoped>
	.ication{
		display: flex;
		flex-wrap: wrap;
		justify-content: space-between;
		.ication-main{
			font-size: 28rpx;
			// border: 1px solid #f00;
			width: 20%;
			.ication-img{
				display: flex;
				justify-content: center;
				align-items: center;
				image{
					width:80rpx;
					height: 80rpx;
					border-radius: 50%;
				}
			}
			.ication-text{
				// border: 1px solid #000;
				margin-top: 8rpx;
				width: 100%;
				font-size: 27rpx;
				// transform: scale(0.9);
				text-align: center;
			}
		}
	}
</style>